package org.zjt.helloworld;

import com.alibaba.fastjson.JSONObject;
import org.zjt.helloworld.domain.RequestMsgProto;

import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/**
 * Hello world!
 *
 */
public class App {

    public static RequestMsgProto.Request createRequest(){
        RequestMsgProto.Request.Builder builder =RequestMsgProto.Request.newBuilder();
        builder.setRequestType(RequestMsgProto.Request.RequestType.SUCCESS);
        RequestMsgProto.Request.RequestData.Builder dataBuilder = RequestMsgProto.Request.RequestData.newBuilder();
        dataBuilder.setName("request");
        dataBuilder.setValue(112);
        builder.addData(dataBuilder);
        builder.addHttpCode(222);
       return builder.build();
    }





    public static String main(  ) throws Exception{

       /* byte[] bytes=createRequest().toByteArray();

        System.out.println(bytes);
        RequestMsgProto.Request request = RequestMsgProto.Request.parseFrom(bytes);
        System.out.println(request.getRequestTypeValue());


        Class cls = Class.forName("chb.test.reflect.Student");

        Class paramClass = Class.forName("chb.test.reflect.Student");

        Method setMethod = cls.getDeclaredMethod("setAge", paramClass );
        setMethod.invoke(cls.newInstance(), param);

        */

       System.out.println("111111111111111-------------------------------33333333333333333333333");
        return "ssssssssss";

    }
}
